package com.hoshiicloud.goods.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.query.OmnipotentParam;
import com.hoshiicloud.common.query.OmnipotentWrapper;
import com.hoshiicloud.common.update.UpdateBatchParam;
import com.hoshiicloud.goods.entity.goods.Gallery;
import com.hoshiicloud.goods.entity.spu.ExtSpuTags;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <p>
 * 基础SKU商品图片资源 服务类
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-04
 */
public interface GalleryService extends IService<Gallery> {

    /**
     * 保存相册信息
     */
    Gallery saveGallery(Gallery entity);

    /**
     * 根据Id 更新相册信息
     */
    boolean updateGalleryById(Gallery entity);

    boolean  deleteGalleryById(Long id);

    /**
     *  根据自定义条件查询相册信息
     */
    List<Gallery> getGalleryByWrapper(QueryWrapper wrapper, String key);

    /**
     * 批量删除
     */
    Boolean deleteBatchs(List<Long> ids);

    /**
     * 根据自定义条件进行批量更新
     */
    boolean updateBatchByWrapper(UpdateBatchParam<Gallery> updateBatchParam);

    /**
     * 批量新增相册信息
     */
    boolean saveGalleryBatch(List<Gallery> galleries);

    /**
     * 自定义批量查询相册信息
     */
    List<Gallery> queryBatch(List<OmnipotentWrapper> param);

    boolean deleteById(Long id);

    /**
     * 批量更新
     */
    Boolean updateBatch(OmnipotentParam<Gallery> param);
}
